home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1996 April / Macworld (1996-04).dmg / Educational Demos / Goldilocks Gamebook / Goldilocks.DIR / 00536_Script_536 < prev    next >
Text File  |  1995-11-20  |  913b  |  36 lines

  1. -- Go Story
  2.  
  3. on mouseDown 
  4.   global MC
  5.   puppetSound "Click.AIF"
  6.   put mouseCast() into MC  
  7.   repeat while stillDown() = 1    
  8.     if mouseCast() = MC then      
  9.       set the castNum of sprite (the ClickOn) to MC +1      
  10.       updateStage 
  11.       next repeat    
  12.     end if    
  13.     if (mouseCast() <> MC + 1) then set the castNum of sprite (the ClickOn) to MC    
  14.     updateStage 
  15.   end repeat 
  16. end
  17.  
  18. on mouseUp
  19.   global MC,pageCount
  20.   set the castNum of sprite (the clickOn) to MC  
  21.   updateStage
  22.   if the mouseCast = MC or the mouseCast = MC + 1 then
  23.     sound stop 1
  24.     sound stop 2
  25.     set the visible of sprite 9 to FALSE
  26.     set the visible of sprite 10 to FALSE
  27.     put pageCount & ".DIR" into currentPage
  28.     puppetSprite 2, FALSE
  29.     puppetSprite 3, FALSE
  30.     puppetSprite 4, FALSE
  31.     puppetSprite 5, FALSE
  32.     puppetSprite 6, FALSE
  33.     go to "Intro"
  34.   end if 
  35. end 
  36.